// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
// 引入element-ui进行开发
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

// 引入Echarts
import echarts from 'echarts'
// 引入china.json
import china from 'echarts/map/json/china.json'

//  引入图标库font-awesome
// import 'font-awesome/css/font-awesome.min.css'

// 设置反向代理前端的请求默认发送到后端的配置端口
var axios = require('axios')

axios.defaults.baseURL = 'http://localhost:8443/api'

// 全局注册，之后可以在其他的组件中通过this.$axios 发送数据

Vue.prototype.$axios = axios

Vue.config.productionTip = false

Vue.use(ElementUI)
Vue.use(router)

// 初始化Echarts
// var echarts = require('echarts')
Vue.prototype.$echarts = echarts
echarts.registerMap('china',china)
/* eslint-disable no-new */
new Vue({
  // el: '#app',
  // router,
  // components: { App },
  // template: '<App/>'
  router,
  render: h => h(App)
}).$mount('#app')
